<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="../../common/head.jsp"%>
</head>
<body>
	<script type="text/javascript">
		var btn = "${sessionScope.role.btn}";
	</script>
	<script type="text/javascript" src="/dist/js/subPages/userDetail.js"></script>
	<table id="userDetailVoDg" class="easyui-datagrid"
		data-options="url:'./../userDetail/query',rownumbers:true,
        toolbar:'#userDetailVoDgTbar', pageSize:20,pageList:[10,20,30,50,1000],pagination:true,striped:true,fit:true,
        singleSelect: false,selectOnCheck: false,onClickRow: userDetailVo.onClickRow, rowStyler: userDetailVo.rowStyler">
		<thead>
			<tr>
				<th data-options="field:'id',checkbox:true">用户ID</th>
				<th
					data-options="field:'username',width:80,formatter: userDetailVo.usernameFormatter">用户名</th>
				<th data-options="field:'real_name',width:80">真实姓名</th>
				<th data-options="field:'number',width:80">员工号/学号</th>
				<th data-options="field:'nick_name',width:80">昵称</th>
				<th data-options="field:'link_num',width:80">关联账号</th>
				<th data-options="field:'city_name',width:80">所属城市</th>
				<th data-options="field:'company_name',width:80">所属公司</th>

				<!--         <th data-options="field:'qr_code',width:80">二维码</th> -->
				<!--         <th data-options="field:'qr_code_secret',width:80">二维码密钥</th> -->
				<th data-options="field:'user_type_name',width:80">用户类型</th>
				<th data-options="field:'sex_name',width:40">性别</th>
				<th
					data-options="field:'id_code',width:120,formatter: userDetailVo.id_codeFormatter">身份证号</th>
				<th data-options="field:'birthday',width:100">生日</th>
				<th data-options="field:'email',width:80">邮箱</th>
				<th data-options="field:'address',width:80">地址</th>
				<th data-options="field:'card_num',width:80">卡号</th>
				<th data-options="field:'exp_score',width:80">积分</th>
				<th data-options="field:'balance',width:80">余额</th>
				<!--         <th data-options="field:'invitation_code',width:80">邀请码</th> -->
				<!--         <th data-options="field:'last_order_time',width:80">最后下单时间</th> -->
				<th data-options="field:'remark',width:80">备注</th>
				<%--<th data-options="field:'balance',width:40">余额</th>--%>
				<th data-options="field:'register_source_name',width:80">注册来源</th>
				<th data-options="field:'register_time',width:80">注册时间</th>
				<th data-options="field:'login_source_name',width:80">登录来源</th>
				<th data-options="field:'login_time',width:120">登录时间</th>
				<th data-options="field:'login_cnt',width:80">错误登录次数</th>
				<th data-options="field:'lock_time',width:80">锁定时间</th>
				<th data-options="field:'lock_cnt',width:80">锁定次数</th>
			</tr>
		</thead>
	</table>
	<div id="userDetailVoDgTbar">
		<table width="100%">
			<tr>
				<td align="left">&nbsp;&nbsp;真实姓名：&nbsp;&nbsp; <input
					id="real_nameParam" name="real_name" class="easyui-validatebox"
					style="width: 100px;"> &nbsp;&nbsp;用户名：&nbsp;&nbsp;&nbsp; <input
					id="usernameParam" name="username" class="easyui-validatebox"
					style="width: 100px;">
					&nbsp;&nbsp;&nbsp;卡&nbsp;&nbsp;号：&nbsp;&nbsp; <input
					id="card_numParam" name="card_num" class="easyui-validatebox"
					style="width: 100px;">
					&nbsp;&nbsp;&nbsp;地&nbsp;&nbsp;址：&nbsp;&nbsp; <input
					id="addressParam" name="address" class="easyui-validatebox"
					style="width: 100px;">
				</td>
				<td align="right" width="550px"></td>
				<td align="right" width="10px">&nbsp;</td>
			</tr>
			<tr>
				<td align="left">&nbsp;&nbsp;所属公司：&nbsp;&nbsp; <input
					id="company_idParam" class="easyui-combobox" name="company_id"
					data-options="
                    valueField:'id',textField:'name',url:'./../company/query',
                    loader: common.comboBoxLoaderPage, editable: false,
                    onBeforeLoad: function(param){
                        param.page = 1;param.rows = 100;
                    } "
					style="width: 100px;" /> &nbsp;&nbsp;所属城市：&nbsp;&nbsp; <input
					id="cityParam" class="easyui-combobox" name="cityParam"
					data-options="
                    valueField:'code',textField:'name',url:'./../dictionary/selectByCode?code=10',
                    editable: false,loader: common.comboBoxLoader"
					style="width: 104px;" /> &nbsp;&nbsp;性&nbsp; &nbsp;别：&nbsp;&nbsp; <input
					id="sexParam" class="easyui-combobox" name="sexParam"
					data-options="
                    valueField:'code',textField:'name',url:'./../dictionary/selectByCode?code=13',
                    editable: false,loader: common.comboBoxLoader"
					style="width: 104px;" /> &nbsp;&nbsp;用户类型：&nbsp;&nbsp; <input
					id="usertypeParam" class="easyui-combobox" name="usertypeParam"
					data-options="
                    valueField:'code',textField:'name',url:'./../dictionary/selectByCode?code=14',
                    editable: false,loader: common.comboBoxLoader"
					style="width: 104px;" />
				</td>
				<td id="btnList" align="right" width="650px">
					<%--<a id="import" class="easyui-linkbutton" href="javascript:void(0);"  plain="false">导入</a>--%>
					<%--<a id="export" class="easyui-linkbutton" href="javascript:void(0);"  plain="false">导出</a>--%>
					<%--<a id="push" class="easyui-linkbutton" href="javascript:void(0);"  plain="false">推送</a>--%>
				</td>
				<td align="right" width="10px">&nbsp;</td>
			</tr>
			<tr>
				<td align="left">&nbsp;&nbsp;起始时间：&nbsp;&nbsp; <input
					id="startParam" name="startParam" class="Wdate" type="text"
					style="width: 172px"
					onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
					&nbsp;&nbsp;终止时间：&nbsp;&nbsp; <input id="endParam" name="endParam"
					class="Wdate" type="text" style="width: 172px"
					onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" /> <a
					id="query" class="easyui-linkbutton" href="javascript:void(0);"
					iconCls="icon-search" plain="true">查询</a> <a
					class="easyui-linkbutton" href="javascript:void(0);" plain="true"
					name="today" id="today">今天</a> <a class="easyui-linkbutton"
					href="javascript:void(0);" plain="true" name="yesterday"
					id="yesterday">昨天</a> <a class="easyui-linkbutton"
					href="javascript:void(0);" plain="true" name="thisWeek"
					id="thisWeek">本周</a> <a class="easyui-linkbutton"
					href="javascript:void(0);" plain="true" name="thisMonth"
					id="thisMonth">本月</a>
				</td>
				<td align="right" width="550px"></td>
				<td align="right" width="10px">&nbsp;</td>
			</tr>
		</table>
	</div>
	<div id="userDetailVoDlg" class="easyui-dialog"
		style="width: 450px; height: 550px; padding: 20px"
		data-options="resizable:true,modal:true" closed="true"
		buttons="#userDetailVoDlgBtn">
		<form id="userDetailVoFm" class="fm" method="post"
			enctype="multipart/form-data">
			<div class="fitem">
				<label> 用户名： </label> <input id="username" name="username"
					class="easyui-validatebox"
					data-options="validType: ['maxLength[11]', 'specialChar']">
			</div>
			<div class="fitem">
				<label> 员工号： </label> <input id="number" name="number"
					class="easyui-validatebox"
					data-options="validType: ['maxLength[18]','specialChar']">
			</div>
			<div class="fitem">
				<label> 卡号： </label> <input id="card_num" name="card_num"
					class="easyui-validatebox" placeholder="无卡填0">
			</div>
			<div class="fitem">
				<label> 昵称： </label> <input id="nick_name" name="nick_name"
					class="easyui-validatebox"
					data-options="validType: ['maxLength[18]', 'specialChar']">
			</div>
			<div class="fitem">
				<label> 真实姓名： </label> <input id="real_name" name="real_name"
					class="easyui-validatebox" required="true"
					data-options="validType: ['maxLength[18]', 'specialChar']">
			</div>
			<div class="fitem">
				<label> 性别： </label> <input id="sex" class="easyui-combobox"
					name="sex"
					data-options="
								valueField:'code',textField:'name',url:'./../dictionary/selectByCode?code=13',
								editable:false,
								loader: common.comboBoxLoader"
					required="true" />
			</div>
			<div class="fitem">
				<label> 身份证： </label> <input id="id_code" name="id_code"
					class="easyui-validatebox"
					data-options="validType: 'equalsLength[18]'">
			</div>
			<div class="fitem">
				<label> 生日： </label> <input id="birthday" name="birthday"
					class="Wdate" type="text" style="width: 172px"
					onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
			</div>
			<div class="fitem">
				<label> 所属城市： </label> <input id="id" name="id" type="hidden">
				<input id="city_id" class="easyui-combobox" name="city_id"
					data-options="
                valueField:'code',textField:'name',url:'./../dictionary/selectByCode?code=10',
                editable:false, loader: common.comboBoxLoader"
					required="true" />
			</div>
			<div class="fitem">
				<label> 所属公司： </label> <input id="company_id"
					class="easyui-combobox" name="company_id"
					data-options="
                valueField:'id',textField:'name',url:'./../company/query',
                editable:false, loader: common.comboBoxLoaderPage,
                onBeforeLoad: function(param){
                    param.page = 1;param.rows = 100;
                } "
					required="true" />
			</div>
			<div class="fitem">
				<label> 用户类型： </label> <input id="user_type" class="easyui-combobox"
					name="user_type"
					data-options="
								valueField:'code',textField:'name',url:'./../dictionary/selectByCode?code=14',
								editable:false,
								loader: common.comboBoxLoader"
					required="true" />
			</div>
			<div class="fitem">
				<label> 头像： </label> <input id="portrait" name="portraitUrl"
					type="file">
			</div>
			<div class="fitem">
				<label> 背景图片： </label> <input id="background" name="backgroundUrl"
					type="file">
			</div>
			<div class="fitem">
				<label> 邮箱： </label> <input id="email" name="email"
					class="easyui-validatebox"
					data-options="validType: ['email', 'maxLength[50]']" />
			</div>
			<div class="fitem">
				<label> 地址： </label> <input id="address" name="address"
					class="easyui-validatebox"
					data-options="validType: ['maxLength[200]', 'specialChar']">
			</div>
			<div class="fitem">
				<label> 备注： </label> <input id="remark" name="remark"
					class="easyui-validatebox"
					data-options="validType: ['maxLength[20]', 'specialChar']">
			</div>
			<div class="fitem">
				<label> 最后下单时间： </label> <input id="last_order_time"
					name="last_order_time" class="Wdate" type="text"
					style="width: 172px"
					onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
			</div>
		</form>
		<div id="userDetailVoDlgBtn">
			<a href="#" class="easyui-linkbutton" iconCls="icon-ok">确定</a> <a
				href="#" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
		</div>
		<div id="userImg" class="easyui-dialog"
			style="width: 800px; height: 800px; padding: 20px"
			data-options="resizable:true,modal:true,closable: false"
			closed="true" buttons="#userImgBtn">
			<div id="img"></div>
			<div id="userImgBtn">
				<a href="#" class="easyui-linkbutton" iconCls="icon-ok">关闭</a>
			</div>
		</div>
	</div>
	<div id="uploadDlg" class="easyui-dialog"
		style="width: 400px; height: 200px; padding: 20px"
		data-options="resizable:true,modal:true" closed="true"
		buttons="#uploadDlgBtn">
		<form id="uploadFm" class="fm" method="post"
			enctype="multipart/form-data">
			<div class="fitem">
				<label> 用户导入： </label> <input id="file" name="file" type="file"
					accept="application/vnd.ms-excel">
			</div>
		</form>
		<div id="uploadDlgBtn">
			<a href="#" class="easyui-linkbutton" iconCls="icon-ok">确定</a> <a
				href="#" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
		</div>
	</div>
	<div id="uploadWYDlg" class="easyui-dialog"
		style="width: 400px; height: 200px; padding: 20px"
		data-options="resizable:true,modal:true" closed="true"
		buttons="#uploadWYDlgBtn">
		<form id="uploadWYFm" class="fm" method="post"
			enctype="multipart/form-data">
			<div class="fitem">
				<label> 网易用户导入： </label> <input id="wangyifile" name="wangyifile" type="file"
					accept="application/vnd.ms-excel">
			</div>
		</form>
		<div id="uploadWYDlgBtn">
			<a href="#" class="easyui-linkbutton" iconCls="icon-ok">确定</a> <a
				href="#" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
		</div>
	</div>
	<div id="pushDlg" class="easyui-dialog"
		style="width: 370px; height: 300px; padding: 20px"
		data-options="resizable:true,modal:true" closed="true"
		buttons="#pushDlgBtn">
		<form id="pushFm" class="fm" method="post">
			<label> 消息内容： </label> <input type="hidden" name="pushTitle"
				value="系统消息"> <input type="hidden" id="idstr" name="idstr"
				value="">
			<textarea id="pushContent" name="pushContent" rows="5" cols="35"></textarea>
		</form>
		<div id="pushDlgBtn">
			<a href="#" class="easyui-linkbutton" iconCls="icon-ok">确定</a> <a
				href="#" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
		</div>
	</div>
	<form action="/userDetail/export" id="exportFormDownLoad" method="post">
		<input type="hidden" id="ids" name="ids" value="">
	</form>
</body>
</html>